test: add witness pruning test verifying serialized output size - #332
test: add witness pruning test verifying serialized output size#332stringhandler wants to merge 5 commits into
Conversation
|
It would also be good to check that witnesses are "shrunk", i.e. if we take a single This might not be possible in SimplicityHL, which uses jets for all arithmetic, since jets always take the whole value. But maybe we could take a |
eb116d8 to
7398649
Compare
Add test prune_removes_unused_byte_of_u16_witness_from_serialized_output
Also rename:
prune_removes_unused_witness_from_serialized_output
to:
prune_removes_witness_in_unexecuted_match_branch_from_serialized_output
|
@stringhandler: I opened a PR against this PR to add @apoelstra's test case and fix the formatting. |
Witness pruning
|
@canndrew can you gpg-sign your commits? Then @stringhandler can you directly point your branch to his commits, rather than merging, so that we avoid merge commits in the PR and we also preserve all signatures? Alternately you can just copy the commits, sign them yourself, and give Andrew a coauthor credit. |
Creates a test to check that witnesses are pruned along with programs.
Motivation
I was looking into how pruned programs are checked on elements, and I saw that there are rules that the witness cannot have any extra data. The problem is that witness nodes may be removed from the program tree during pruning.
This test proves that the witness is removed when calling
to_vec_with_witness